<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>

<div class="page-content">
	<div class="page-header">
		<h1>
			oa管理 <small> <i class="icon-double-angle-right"></i> 菜单管理
			</small>
		</h1>
	</div>
	<!-- /.page-header -->

	<div class="row">
		<div class="col-xs-12">
			<!-- PAGE CONTENT BEGINS -->

<div class="row">
	<div class="col-xs-12">

		<div class="table-responsive">
			<div id="sample-table-2_wrapper" class="dataTables_wrapper"
				role="grid">
				<div class="row">
					<div class="col-sm-3">
						<div id="sample-table-2_length" class="dataTables_length">
							<label>Display <select size="1"
						name="sample-table-2_length" aria-controls="sample-table-2"><option
								value="10" selected="selected">10</option>
							<option value="25">25</option>
							<option value="50">50</option>
							<option value="100">100</option></select> records
					</label>
				</div>
			</div>
			<div class="col-sm-3">
			</div>
			<div class="col-sm-6">
				<div class="dataTables_filter" id="sample-table-2_filter">
					<label>Search: <input type="text"
						aria-controls="sample-table-2"></label>
				</div>
			</div>
		</div>
<table id="data_form"
	class="table table-striped table-bordered table-hover dataTable"
	aria-describedby="sample-table-2_info">
	<thead>
		<tr role="row">
			<th class="center sorting_disabled" role="columnheader"
				rowspan="1" colspan="1"
				aria-label="
							"
				style="width: 58px;"><label> <input
		type="checkbox" class="ace"> <span class="lbl"></span>
</label></th>
<th class="sorting" role="columnheader" tabindex="0"
	aria-controls="sample-table-2" rowspan="1" colspan="1"
	aria-label="Domain: activate to sort column ascending"
	style="width: 100px;">ID</th>
<th class="center" role="columnheader" tabindex="0"
	aria-controls="sample-table-2" rowspan="1" colspan="1"
	aria-label="Domain: activate to sort column ascending"
	style="width: 100px;">下一级菜单</th>
<th class="center" role="columnheader" tabindex="0"
	aria-controls="sample-table-2" rowspan="1" colspan="1"
	aria-label="Price: activate to sort column ascending"
	style="width: 119px;">菜单名称</th>
<th class="hidden-480 center" role="columnheader"
	tabindex="0" aria-controls="sample-table-2" rowspan="1"
	colspan="1"
	style="width: 132px;">url</th>
<th class="center" role="columnheader" tabindex="0"
	aria-controls="sample-table-2" rowspan="1" colspan="1"
	style="width: 179px;"><i
	class="icon-time bigger-110 hidden-480"></i>菜单图标</th>
<th class="hidden-480 center" role="columnheader"
	tabindex="0" aria-controls="sample-table-2" rowspan="1"
	colspan="1"
	aria-label="Status: activate to sort column ascending"
	style="width: 172px;">状态
</th>
	
<th class="sorting" role="columnheader" tabindex="0"
	aria-controls="sample-table-2" rowspan="1" colspan="1"
	aria-label="Price: activate to sort column ascending"
	style="width: 119px;">序号
</th>
	<!-- 	<th class="sorting" role="columnheader" tabindex="0"
	aria-controls="sample-table-2" rowspan="1" colspan="1"
	aria-label="Price: activate to sort column ascending"
	style="width: 119px;">备注</th> -->
		<th class="center" role="columnheader" tabindex="0"
	 rowspan="1" colspan="1"
	style="width: 119px;">操作</th>
			
	</tr>
</thead>
<!--数据显示层  -->
<tbody role="alert" aria-live="polite" aria-relevant="all">
<s:iterator value="m" status="count">
<tr class="odd">
	<td class="center  sorting_1"><label> <input
	type="checkbox" class="ace"> <span class="lbl"></span>
</label>
</td>

<td class=" "><a href="#">${menuId }</a></td>
<td class=" "><a href="#">

	<s:iterator value="children"> ${menuId},
	</s:iterator>
	</a></td>
<td class=" ">${menuName}</td>
<td class="hidden-480 ">${menuUrl }</td>
<td class=" ">${menuIcon }</td>

<td class="hidden-480 ">
<span class="label label-sm label-warning">${status }</span>
</td>
<td class="hidden-480 ">
${menuOrder }
</td>

<%-- <td class="hidden-480 ">
${remark }
</td> --%>
<!-- 操作 -->
<td class=" ">
	<div class="visible-md visible-lg hidden-sm hidden-xs action-buttons">
		<a class="blue" data-toggle="modal" href="#modal-table" id="view_menu">
		 <i class="icon-zoom-in bigger-130"></i>
		</a> <a class="green"  onclick="doedit('<s:iterator value="parent">${menuId}</s:iterator>','${menuName}','${menuUrl }','${menuIcon }','${status }','${menuOrder }','${remark }','${menuId }')"> <i
			class="icon-pencil bigger-130"></i>
		</a> <a class="red" href="menu!delMenu?menuId=${menuId }" onclick=" return confirm('确定删除？')"> <i
			class="icon-trash bigger-130"></i></a>
	</div>

	<div class="visible-xs visible-sm hidden-md hidden-lg">
		<div class="inline position-relative">
			<button class="btn btn-minier btn-yellow dropdown-toggle"
				data-toggle="dropdown">
				<i class="icon-caret-down icon-only bigger-120"></i>
			</button>
			<ul
				class="dropdown-menu dropdown-only-icon dropdown-yellow pull-right dropdown-caret dropdown-close">
				<li><a href="#" class="tooltip-info"
					data-rel="tooltip" title="" data-original-title="View">
	<span class="blue"> <i class="icon-zoom-in bigger-120"></i></span>
	</a></li>

	<li><a href="#" class="tooltip-success"
		data-rel="tooltip" title="" data-original-title="Edit">
			<span class="green"> <i
				class="icon-edit bigger-120"></i>
		</span>
	</a></li>

	<li><a href="#" class="tooltip-error"
		data-rel="tooltip" title="" data-original-title="Delete">
			<span class="red"> <i
				class="icon-trash bigger-120"></i>
		</span>
					</a></li>
				</ul>
			</div>
		</div>
	</td>
</tr>
</s:iterator>
</tbody>
</table>
<div class="row">
					<div class="col-sm-6">
						<div class="dataTables_info" id="sample-table-2_info">
						${m.size() }
						 </div>
					</div>
					<div class="col-sm-6">
						<div class="dataTables_paginate paging_bootstrap">
							<ul class="pagination">
								<li class="prev disabled"><a href="#"><i
										class="icon-double-angle-left"></i></a></li>
								<li class="active"><a href="#">1</a></li>
								<li><a href="#">2</a></li>
								<li><a href="#">3</a></li>
								<li class="next"><a href="#"><i
										class="icon-double-angle-right"></i></a></li>
							</ul>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
			<!--button  -->
			<div class="hr hr-18 dotted hr-double"></div>
				<h4 class="pink">
					<i class="icon-hand-right icon-animated-hand-pointer blue"></i>
					<a href="#add_menu" role="button" class="green" data-toggle="modal"> 添加菜单</a>
				</h4>
</div><!-- end pagecontent -->
<!-- modal -->
<!-- edit modal -->
<div class="modal fade text-center" id="edit_menu"  >
	<div class="modal-dialog" style="display: inline-block; width: auto;">
<form action="menu!editMenu" method="post" id="_edit">
<input type="hidden" id="menuId" name="menuId">
		<div class="modal-content">
		<div class="modal-header">
			<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
			<h4 class="modal-title">编辑菜单</h4>
		</div>
			<div class="modal-body">
<table class="table table-striped table-bordered table-hover no-margin-bottom no-border-top">
				<tbody>
				<tr class="FormData">
				<td>上一级菜单</td>
				<td><input type="text" id="parentId" name="parentId" value="">
				</td>
				</tr>
				<tr class="FormData">
				<td>菜单名称</td>
				<td><input type="text" id="menuName" name="menuName" value="">
				</td>
				</tr>
				<tr class="FormData">
				<td>URL</td>
				<td><input id="menuUrl" type="text" name="menuUrl" value="">
				</td>
				</tr>
				<tr class="FormData">
				<td>菜单图标</td>
				<td><input type="text" id="menuIcon" name="menuIcon" value="" >
				</td>
				</tr>
				<tr class="FormData">
				<td>状态</td>
				<td>
				<label class="inline">
				<input type="checkbox" id="status" name="status" value="" role="checkbox">
				<span class="lbl"></span></label>
				</td>
				</tr>
				<tr class="FormData">
				<td>序号</td>
				<td><input type="text" id="menuOrder" name="menuOrder" value="">
				</td>
				</tr>
				<tr class="FormData">
				<td>备注</td>
				<td><input type="text" name="remark" id="remark">
				</td></tr>
				</tbody>
			</table>
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
				<input type="submit" class="btn btn-primary" name="保存">
			</div>
			
		</div><!-- /.modal-content -->
		</form>
	</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<!-- modal -->
<div class="modal fade text-center" id="add_menu"  >
	<div class="modal-dialog" style="display: inline-block; width: auto;">
<form action="menu!addMenu" method="post" id="add_menu">
		<div class="modal-content">
		<div class="modal-header">
			<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
			<h4 class="modal-title">添加菜单</h4>
		</div>
			<div class="modal-body">
<table class="table table-striped table-bordered table-hover no-margin-bottom no-border-top">
				<tbody>
				<tr class="FormData">
				<td>父ID</td>
				<td><input type="text" name="parentId" >
				</td>
				</tr>
				<tr class="FormData">
				<td>菜单名称</td>
				<td><input type="text" name="menuName" >
				</td>
				</tr>
				<tr class="FormData">
				<td>URL</td>
				<td><input type="text" name="menuUrl" >
				</td>
				</tr>
				<tr class="FormData">
				<td>菜单图标</td>
				<td><input type="text" name="menuIcon" >
				</td>
				</tr>
				<tr class="FormData">
				<td>状态</td>
				<td>
				<label class="inline">
				启用:<input type="checkbox" name="status" value="1" >
				<span class="lbl"></span></label>
				</td>
				</tr>
				<tr class="FormData">
				<td>序号</td>
				<td><input type="text" name="menuOrder" >
				</td>
				</tr>
				<tr class="FormData">
				<td>备注</td>
				<td><input type="text" name="remark" >
				</td>
				</tr>
				</tbody>

			</table>

			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
				<input type="submit" class="btn btn-primary" name="保存">
			</div>
			
		</div><!-- /.modal-content -->
		</form>
	</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<!-- modal end -->
			
<!-- modal -->
<div id="modal-table" class="modal fade text-center" tabindex="-1">
<div class="modal-dialog"  style="display: inline-block; width: auto;">
	<div class="modal-content">
		<div class="modal-header no-padding">
	<div class="table-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
<span class="white">&times;</span></button>详情：</div>
</div>
		<div class="modal-body no-padding">
			<table class="table table-striped table-bordered table-hover no-margin-bottom no-border-top">
				<thead>
					<tr>
						<th>菜单名称</th>
						<th>菜单路径</th>
						<th>菜单图标</th>
						<th>状态</th>
						<th style="width: 272px;">备注</th>
					</tr>
				</thead>

				<tbody>
					<tr>
						<td>
							<a href="#">ace.com</a>
						</td>
						<td>$45</td>
						<td>3,330</td>
						<td>Feb 12</td>
					</tr>

				</tbody>
			</table>
		</div>

		<div class="modal-footer no-margin-top">
			<button class="btn btn-sm btn-danger pull-right" data-dismiss="modal">
				<i class="icon-remove"></i>
				Close
			</button>

		</div>
		</div>
	</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->



<!-- end -->
									
									<!--  ui-widge-->
									<!--  end-->
									
			<!-- PAGE CONTENT ENDS -->
		</div>
		<!-- /.col -->
	</div>
	<!-- /.row -->
	
</div>
</html>
